Public Class ToolStripDemo

    Private Sub ToolStripDemo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Khai baùo vaø khôûi taïo ñoái töôïng ToolStrip
        Dim ts As ToolStrip = New ToolStrip()
        ' Khai baùo thuoäc tính cho ñoái töôïng ToolStrip
        ts.Dock = DockStyle.Bottom
        ' Khai baùo vaø khôûi taïo ñoái töôïng ToolStripTextBox
        Dim tt As New ToolStripTextBox()
        tt.Text = "*.*"
        ' Khai baùo vaø khôûi taïo ñoái töôïng ToolStripButton
        Dim bt As ToolStripButton = New ToolStripButton()
        bt.Text = "Go"

        Dim tc As New ToolStripComboBox()
        tc.Text = "Folder"
        tc.Items.Add("Folder")
        tc.Items.Add("File")
        ' Khai baùo theâm ñoái töôïng ToolStripTextBox vaøo ñoái töôïng  ToolStrip
        ts.Items.Add(tt)
        ' Khai baùo theâm ñoái töôïng ToolStripButton vaøo ñoái töôïng ToolStrip
        ts.Items.Add(bt)
        ' Khai baùo theâm ñoái töôïng ToolStripComboBox vaøo ñoái töôïng ToolStrip
        ts.Items.Add(tc)
        ' Khai baùo theâm ñoái töôïng ToolStrip vaøo Form
        Me.Controls.Add(ts)

    End Sub
End Class
